package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaMessage;
import com.ruoyi.system.mapper.JiajiaMessageMapper;
import com.ruoyi.system.service.IJiajiaMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 消息后台Service业务层处理
 * 
 * @author knd
 * @date 2021-10-15
 */
@Service
public class JiajiaMessageServiceImpl implements IJiajiaMessageService
{
    @Autowired
    private JiajiaMessageMapper jiajiaMessageMapper;

    /**
     * 查询消息后台
     * 
     * @param id 消息后台主键
     * @return 消息后台
     */
    @Override
    public JiajiaMessage selectJiajiaMessageById(Long id)
    {
        return jiajiaMessageMapper.selectJiajiaMessageById(id);
    }

    /**
     * 查询消息后台列表
     * 
     * @param jiajiaMessage 消息后台
     * @return 消息后台
     */
    @Override
    public List<JiajiaMessage> selectJiajiaMessageList(JiajiaMessage jiajiaMessage)
    {
        return jiajiaMessageMapper.selectJiajiaMessageList(jiajiaMessage);
    }

    /**
     * 新增消息后台
     * 
     * @param jiajiaMessage 消息后台
     * @return 结果
     */
    @Override
    public int insertJiajiaMessage(JiajiaMessage jiajiaMessage)
    {
        return jiajiaMessageMapper.insertJiajiaMessage(jiajiaMessage);
    }

    /**
     * 修改消息后台
     * 
     * @param jiajiaMessage 消息后台
     * @return 结果
     */
    @Override
    public int updateJiajiaMessage(JiajiaMessage jiajiaMessage)
    {
        return jiajiaMessageMapper.updateJiajiaMessage(jiajiaMessage);
    }

    @Override
    public int yiDuAllMessage(JiajiaMessage jiajiaMessage) {
        return jiajiaMessageMapper.yiDuAllMessage(jiajiaMessage);
    }

    /**
     * 批量删除消息后台
     * 
     * @param ids 需要删除的消息后台主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaMessageByIds(String ids)
    {
        return jiajiaMessageMapper.deleteJiajiaMessageByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除消息后台信息
     * 
     * @param id 消息后台主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaMessageById(Long id)
    {
        return jiajiaMessageMapper.deleteJiajiaMessageById(id);
    }
}
